﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.Web;

namespace Model
{

    [MetadataType(typeof(TimeCardSet_Metadata))]
    [DisplayName("考勤设定")]
    public partial class TimeCardSet
    {
        public TimeCardSet()
        {
            this.Id = Guid.NewGuid();
            this.StartDate = DateTime.Now.Date;
            this.EndDate = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
            this.UserId = new Guid(HttpContext.Current.User.Identity.Name);
        }

        public class TimeCardSet_Metadata
        {
            [ScaffoldColumn(false)]
            public System.Guid Id { get; set; }

            [ScaffoldColumn(false)]
            public Guid UserId { get; set; }

            [DisplayName("开始时间")]
            public object StartDate { get; set; }

            [DisplayName("结束时间")]
            public object EndDate { get; set; }

            [DisplayName("上班时间")]
            public object WorkTime { get; set; }

            [DisplayName("下班时间")]
            public object AfterWorkTime { get; set; }

            [DisplayName("备注")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public object Note { get; set; }
        }
    }
}
